<?php
	//反射API
	class Person{
		public $name;
		public $gender;
		public function say(){
			echo $this->name,'is',$this->gender;
		}
	}
	//$student反射对象 属性
	$reflect=new ReflectionClass("Person");
	$className=$reflect->getName();
	$methods=$properties=array();
	foreach($reflect->getMethods() as $v){
		$methods[$v->getName()]=$v;
	}
	foreach($reflect->getProperties() as $v){
		$properties[$v->getName()]=$v;
	}
//	var_dump($properties);
	echo "class {$className} \n{\n";
	foreach($properties as $k=>$v){
		echo '\t';
		echo $v->isPublic()?'Public':'',$v->isPrivate()?'Private':'',$v->isProtected()?'Protected':'',
			 $v->isStatic()?"Static":'';
		echo "\t{$k}\n";
	}
	echo '\n';
	foreach($methods as $k=>$v){
		echo "\t function {$k} (){} \n";
	}
	echo "}\n";
